import request from '@/router/axios';
//任务评审权重设置
// 列表
export const getWeightList = (params) => {
  return request({
    url: '/api/hg-public/plancontrolweight/list',
    method: 'get',
    params: {
      ...params,
    }
  })
}
  
// 更新任务评审权重-批量保存
export const updateWeight = (row) => {
  return request({
    url: '/api/hg-public/plancontrolweight/submit',
    method: 'post',
    data: row
  })
}

// 任务评审权重详情
export const getWeight = (id) => {
  return request({
    url: '/api/hg-public/plancontrolweight/detail',
    method: 'get',
    params: {
      id
    }
  })
}

//跟踪任务状态设置
// 列表
export const getStatusList = (params) => {
  return request({
    url: '/api/hg-public/taskdegreerisk/list',
    method: 'get',
    params: {
      ...params,
    }
  })
}
// 删除跟踪任务状态
export const removeStatus = (ids) => {
  return request({
    url: '/api/hg-public/taskdegreerisk/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}
// 新增跟踪任务状态
export const addStatus = (row) => {
  return request({
    url: '/api/hg-public/taskdegreerisk/submit',
    method: 'post',
    data: row
  })
}
// 更新跟踪任务状态
export const updateStatus = (row) => {
  return request({
    url: '/api/hg-public/taskdegreerisk/submit',
    method: 'post',
    data: row
  })
}
// 跟踪任务状态详情
export const getStatus = (id) => {
  return request({
    url: '/api/hg-public/taskdegreerisk/detail',
    method: 'get',
    params: {
      id
    }
  })
}


//风险级别与任务状态设置
// 列表
export const getRiskList = (params) => {
  return request({
    url: '/api/hg-public/riskrunning/list',
    method: 'get',
    params: {
      ...params,
    }
  })
}
// 删除风险级别与任务状态
export const removeRisk = (ids) => {
  return request({
    url: '/api/hg-public/riskrunning/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}
// 新增风险级别与任务状态
export const addRisk = (row) => {
  return request({
    url: '/api/hg-public/riskrunning/submit',
    method: 'post',
    data: row
  })
}
// 更新风险级别与任务状态
export const updateRisk = (row) => {
  return request({
    url: '/api/hg-public/riskrunning/submit',
    method: 'post',
    data: row
  })
}
// 跟踪风险级别与任务状态
export const getRisk = (id) => {
  return request({
    url: '/api/hg-public/riskrunning/detail',
    method: 'get',
    params: {
      id
    }
  })
}
